import request from '@/utils/request';
//获取企业部门列表
export async function fetchListDepartment(params) {
    return request('/department/listDepartment', {
        params,
    });
}
//修改部门信息
export async function fakeUpdateDepartment(data) {
    return request('/department/updateDepartment', {
        method: 'post',
        data,
    });
}

//新增部门
export async function fakeInsertDepartment(data) {
    return request('/department/insertDepartment', {
        method: 'post',
        data,
    });
}

//删除部门
export async function fakeDeleteDepartment(data) {
    return request('/department/deleteDepartment', {
        method: 'post',
        data,
    });
}
//获取员工列表
export async function fetchSearchAdmin(params) {
    return request('/auth/admin/searchAdmin', {
        params,
    });
}
// 获取机构的角色列表
export async function fetchRole(params) {
    return request('/auth/role/listRole', {
        params,
    });
}

// 获取机构的角色详情
export async function fetchRoleDetail(params) {
    return request('/auth/role/getRoleDetail', {
        params,
    });
}

//删除角色绑定的员工
export async function fakeDeleteRoleAdmin(data) {
    return request('/auth/role/deleteRoleAdmin', {
        method: 'post',
        data,
    });
}


// get 获取导入模板
export async function fetchImportAdminExcelTemplate(params) {
    return request('/auth/admin/getImportAdminExcelTemplate', {
        params,
    });
}

// get 获取导入模板
export async function fetchExportAdmin(data) {
    return request('/auth/admin/exportAdmin', {
        method: 'post',
        data,
    });
}

// post 获取验证码
export async function fakeSendSmsCodeBack(data) {
    return request('/common/sms/sendSmsCodeBack', {
        method: 'post',
        data,
    });
}



// post 新增角色
export async function fakeInsertAuthRole(data) {
    return request('/auth/role/insertAuthRole', {
        method: 'post',
        data,
    });
}




// post 修改角色
export async function fakeUpdateAuthRole(data) {
    return request('/auth/role/updateAuthRole', {
        method: 'post',
        data,
    });
}

//新增员工
export async function fakeInsertAuthAdmin(data) {
    return request('/auth/admin/insertAuthAdmin', {
        method: 'post',
        data,
    });
}

//修改员工
export async function fakeUpdateAuthAdmin(data) {
    return request('/auth/admin/updateAuthAdmin', {
        method: 'post',
        data,
    });
}


//禁用员工
export async function fakeDisableAdmin(data) {
    return request('/auth/admin/disableAdmin', {
        method: 'post',
        data,
    });
}


//启用员工
export async function fakeEnableAdmin(data) {
    return request('/auth/admin/enableAdmin', {
        method: 'post',
        data,
    });
}


// get 获取员工详情
export async function fetchAdminDetail(params) {
    return request('/auth/admin/getAdminDetail', {
        params,
    });
}


// get 分页获取群活码信息
export async function fetchListChatCode(params) {
    return request('/organization/qywx/chatCode/listChatCode', {
        params,
    });
}


//删除角色
export async function fetchDeleteAuthRole(data) {
    return request('/auth/role/deleteAuthRole', {
        method: 'post',
        data,
    });
}

//删除角色
export async function fetchDeleteRoleAdmin(data) {
    return request('/auth/role/deleteRoleAdmin', {
        method: 'post',
        data,
    });
}



